<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>订单管理</title>
	<%--静态包含 base标签，css样式，jQuery--%>
	<%@ include file="../common/head.jsp" %>
	<script type="text/javascript">
		var sendFun = function(){
			alert("已放货");
			return false;
		}
		$(function(){
			/*$("a").click(function(){
				alert("");
				return false;
			});*/
		});

	</script>
</head>
<body>
	<div id="header">
		<img class="logo_img" alt="" src="static/img/logo.gif" >
		<span class="wel_word">订单管理系统</span>
		<%--静态包含manager管理模块的菜单--%>
		<%@ include file="/pages/common/manager_menu.jsp" %>
	</div>
	<div id="main">
		<table>
			<tr>
				<td>日期</td>
				<td>金额</td>
				<td>详情</td>
				<td>发货</td>
			</tr>
			<c:forEach items="${requestScope.orders}" var="order">
				<tr>
					<td>${order.createTime}</td>
					<td>${order.price}</td>
					<td><a href="orderServlet?action=showOrderDetail&orderId=${order.orderId}">查看详情</a></td>
					<%--判断订单的状态，来确定订单的操作--%>
					<td>
						<c:if test="${order.status == 0}">
							<a href="orderServlet?action=sendOrder&orderId=${order.orderId}" class="">点击发货</a>
						</c:if>
						<c:if test="${order.status == 1}">
							等待收货
						</c:if>
						<c:if test="${order.status == 2}">
							已收货
						</c:if>
					</td>
				</tr>
			</c:forEach>
		</table>
	</div>

	<%--静态包含页脚内容--%>
	<%@ include file="../common/footer.jsp" %>
</body>
</html>